package com.css.dzj.dzjap.modules.project.generecord.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

/**
 * 一般工程备案表
 *
 * @author liyuan
 */
@Entity
@Table(name = "AP_GENERAL_RECORD", schema = "DZJAP", catalog = "")
public class Generecord {
    private String reId;
    private String proName;
    private String proAddress;
    private String proContent;
    private String unitName;
    private String unitUser;
    private String unitPhone;
    private String unitCode;
    private String unitLegal;
    private String earthquakeBasis;
    private String earthquakeAttach;
    private Date reCreateTime;
    private String reCreateUser;
    private String reCreateDepartment;
    private String reRemark;
    private String checkUser;
    private String checkOrg;
    /* 默认为null, 0不同意，1同意 */
    private String checkResult;
    private String checkView;
    private String createUser;
    private String createUserType;
    private Date createTime;
    private String updateUser;
    private Date updateTime;
    private String delFlag;
    /* 上报状态，0未上报，1已上报 */
    private String reportStatus;
    /* 状态标志位共用，0未提交暂存，1已提交待审核，2审核未通过，3审核通过 */
    private String checkStatus;
    /* 公告状态，0未拟制，1已拟制 */
    private String noticeStatus;
    /* 组织等级用来区分用户，0：中国地震局，1：省级地震局，2：地市级地震局 */
    private String orgLevel;
    /*
     行业性质 1城镇给排水、燃气、热力建筑；2电力建筑；3交通运输建筑；
     4邮电通信、广播电视建筑； 5公共建筑；6居住建筑  ；7  工业建筑 ；8  仓库类建筑
    */
    private String industry;

    @Id
    @Column(name = "RE_ID")
    /*@GeneratedValue(generator = "idGenerator")
    @GenericGenerator(name = "idGenerator", strategy = "com.css.dzj.dzjap.common.util.SnowflakeId")*/
    public String getReId() {
        return reId;
    }

    public void setReId(String reId) {
        this.reId = reId;
    }

    @Basic
    @Column(name = "PRO_NAME")
    public String getProName() {
        return proName;
    }

    public void setProName(String proName) {
        this.proName = proName;
    }

    @Basic
    @Column(name = "PRO_ADDRESS")
    public String getProAddress() {
        return proAddress;
    }

    public void setProAddress(String proAddress) {
        this.proAddress = proAddress;
    }

    @Basic
    @Column(name = "PRO_CONTENT")
    public String getProContent() {
        return proContent;
    }

    public void setProContent(String proContent) {
        this.proContent = proContent;
    }

    @Basic
    @Column(name = "UNIT_NAME")
    public String getUnitName() {
        return unitName;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }

    @Basic
    @Column(name = "UNIT_USER")
    public String getUnitUser() {
        return unitUser;
    }

    public void setUnitUser(String unitUser) {
        this.unitUser = unitUser;
    }

    @Basic
    @Column(name = "UNIT_PHONE")
    public String getUnitPhone() {
        return unitPhone;
    }

    public void setUnitPhone(String unitPhone) {
        this.unitPhone = unitPhone;
    }

    @Basic
    @Column(name = "UNIT_CODE")
    public String getUnitCode() {
        return unitCode;
    }

    public void setUnitCode(String unitCode) {
        this.unitCode = unitCode;
    }

    @Basic
    @Column(name = "UNIT_LEGAL")
    public String getUnitLegal() {
        return unitLegal;
    }

    public void setUnitLegal(String unitLegal) {
        this.unitLegal = unitLegal;
    }

    @Basic
    @Column(name = "EARTHQUAKE_BASIS")
    public String getEarthquakeBasis() {
        return earthquakeBasis;
    }

    public void setEarthquakeBasis(String earthquakeBasis) {
        this.earthquakeBasis = earthquakeBasis;
    }

    @Basic
    @Column(name = "EARTHQUAKE_ATTACH")
    public String getEarthquakeAttach() {
        return earthquakeAttach;
    }

    public void setEarthquakeAttach(String earthquakeAttach) {
        this.earthquakeAttach = earthquakeAttach;
    }

    @Basic
    @Column(name = "RE_CREATE_TIME")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Date getReCreateTime() {
        return reCreateTime;
    }

    public void setReCreateTime(Date reCreateTime) {
        this.reCreateTime = reCreateTime;
    }

    @Basic
    @Column(name = "RE_CREATE_USER")
    public String getReCreateUser() {
        return reCreateUser;
    }

    public void setReCreateUser(String reCreateUser) {
        this.reCreateUser = reCreateUser;
    }

    @Basic
    @Column(name = "RE_CREATE_DEPARTMENT")
    public String getReCreateDepartment() {
        return reCreateDepartment;
    }

    public void setReCreateDepartment(String reCreateDepartment) {
        this.reCreateDepartment = reCreateDepartment;
    }

    @Basic
    @Column(name = "RE_REMARK")
    public String getReRemark() {
        return reRemark;
    }

    public void setReRemark(String reRemark) {
        this.reRemark = reRemark;
    }

    @Basic
    @Column(name = "CHECK_USER")
    public String getCheckUser() {
        return checkUser;
    }

    public void setCheckUser(String checkUser) {
        this.checkUser = checkUser;
    }

    @Basic
    @Column(name = "CHECK_ORG")
    public String getCheckOrg() {
        return checkOrg;
    }

    public void setCheckOrg(String checkOrg) {
        this.checkOrg = checkOrg;
    }

    @Basic
    @Column(name = "CHECK_RESULT")
    public String getCheckResult() {
        return checkResult;
    }

    public void setCheckResult(String checkResult) {
        this.checkResult = checkResult;
    }

    @Basic
    @Column(name = "CHECK_VIEW")
    public String getCheckView() {
        return checkView;
    }

    public void setCheckView(String checkView) {
        this.checkView = checkView;
    }

    @Basic
    @Column(name = "CREATE_USER")
    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    @Basic
    @Column(name = "CREATE_USER_TYPE")
    public String getCreateUserType() {
        return createUserType;
    }

    public void setCreateUserType(String createUserType) {
        this.createUserType = createUserType;
    }

    @Basic
    @Column(name = "CREATE_TIME")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "UPDATE_USER")
    public String getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }

    @Basic
    @Column(name = "UPDATE_TIME")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Basic
    @Column(name = "DEL_FLAG")
    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    @Basic
    @Column(name = "REPORT_STATUS")
    public String getReportStatus() {
        return reportStatus;
    }

    public void setReportStatus(String reportStatus) {
        this.reportStatus = reportStatus;
    }

    @Basic
    @Column(name = "CHECK_STATUS")
    public String getCheckStatus() {
        return checkStatus;
    }

    public void setCheckStatus(String checkStatus) {
        this.checkStatus = checkStatus;
    }

    @Basic
    @Column(name = "NOTICE_STATUS")
    public String getNoticeStatus() {
        return noticeStatus;
    }

    public void setNoticeStatus(String noticeStatus) {
        this.noticeStatus = noticeStatus;
    }

    @Basic
    @Column(name = "ORG_LEVEL")
    public String getOrgLevel() {
        return orgLevel;
    }

    public void setOrgLevel(String orgLevel) {
        this.orgLevel = orgLevel;
    }

    @Basic
    @Column(name = "INDUSTRY")
    public String getIndustry() {
        return industry;
    }

    public void setIndustry(String industry) {
        this.industry = industry;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Generecord that = (Generecord) o;
        return Objects.equals(reId, that.reId) &&
                Objects.equals(proName, that.proName) &&
                Objects.equals(proAddress, that.proAddress) &&
                Objects.equals(proContent, that.proContent) &&
                Objects.equals(unitName, that.unitName) &&
                Objects.equals(unitUser, that.unitUser) &&
                Objects.equals(unitPhone, that.unitPhone) &&
                Objects.equals(unitCode, that.unitCode) &&
                Objects.equals(unitLegal, that.unitLegal) &&
                Objects.equals(earthquakeBasis, that.earthquakeBasis) &&
                Objects.equals(earthquakeAttach, that.earthquakeAttach) &&
                Objects.equals(reCreateTime, that.reCreateTime) &&
                Objects.equals(reCreateUser, that.reCreateUser) &&
                Objects.equals(reCreateDepartment, that.reCreateDepartment) &&
                Objects.equals(reRemark, that.reRemark) &&
                Objects.equals(checkUser, that.checkUser) &&
                Objects.equals(checkOrg, that.checkOrg) &&
                Objects.equals(checkResult, that.checkResult) &&
                Objects.equals(checkView, that.checkView) &&
                Objects.equals(createUser, that.createUser) &&
                Objects.equals(createUserType, that.createUserType) &&
                Objects.equals(createTime, that.createTime) &&
                Objects.equals(updateUser, that.updateUser) &&
                Objects.equals(updateTime, that.updateTime) &&
                Objects.equals(delFlag, that.delFlag) &&
                Objects.equals(reportStatus, that.reportStatus) &&
                Objects.equals(checkStatus, that.checkStatus) &&
                Objects.equals(noticeStatus, that.noticeStatus) &&
                Objects.equals(orgLevel, that.orgLevel) &&
                Objects.equals(industry, that.industry);
    }

    @Override
    public int hashCode() {
        return Objects.hash(reId, proName, proAddress, proContent, unitName, unitUser, unitPhone, unitCode, unitLegal, earthquakeBasis, earthquakeAttach, reCreateTime, reCreateUser, reCreateDepartment, reRemark, checkUser, checkOrg, checkResult, checkView, createUser, createUserType, createTime, updateUser, updateTime, delFlag, reportStatus, checkStatus, noticeStatus, orgLevel, industry);
    }
}
